{include file='header'/}
<style>
    #file-list-page {
        position: fixed;
        bottom: 3rem;
    }
</style>
<body class="pear-container">
<form class="layui-form file-library">

    <div class="layui-row layui-col-space15">
        <div class="layui-col-sm3">
            <div class="layui-card">
                <div class="layui-card-body">
                <span class="layui-badge layui-bg-blue"
                      style="width:93%;line-height:30px; height: 30px;">文件分组</span>
                    <div id="organizationTreeContent" style="margin:15px auto;">
                        <ul id="organizationTree" class="dtree organizationTree" data-id="9527"></ul>
                    </div>
                </div>
            </div>
        </div>
        <div class="layui-col-sm9">
            <div class="layui-card">
                <div class="layui-card-body layui-layer-content">
                    <div class="layui-form-item">
                        <div class="layui-inline">
                            <ul id="group-select-Tree" class="dtree" data-id="0"></ul>
                        </div>
                        <div class="layui-inline">
                            <a class="layui-btn layui-btn-danger file-delete" style="">删除</a>
                        </div>
                        <div class="layui-inline">
                            <button type="button" class="layui-btn layui-btn-lvse j-upload"
                                    id="lay_pic" data-input-id="c-pic" data-type="image" data-group-id="0">
                                <i class="layui-icon"></i>上传图片
                            </button>
                        </div>
                    </div>
                    <div id="file-list-body" class="v-box-body"></div>
                    <div id="file-list-page"></div>
                </div>
            </div>
        </div>
    </div>
    <div class="bottom">
        <div class="button-container">
            <a class="pear-btn pear-btn-primary pear-btn-sm btn-sure">&nbsp;&nbsp;确定&nbsp;&nbsp;</a>&nbsp;&nbsp;&nbsp;&nbsp;
            <a onclick="window.close()" class="pear-btn pear-btn-sm">
                <i class="layui-icon layui-icon-refresh"></i>
                关闭
            </a>
        </div>
    </div>
</form>

</body>
{include file='footer'/}
<script>
  layui.use(['table', 'form', 'jquery', 'dtree', 'fileLibrary', 'webuploader', 'upload'], function () {
    let form = layui.form;
    let $ = layui.jquery;
    let upload = layui.upload;

    form.render();
    $('.file-library').fileLibrary({
      input_type: "{$type}",
      select_id: "{$select_id}"
    });

  })

</script>
